<div class="domains index">
	<h2><?php echo __d('domains','Domains');?></h2>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('id');?></th>
			<th><?php echo $this->Paginator->sort('name',__d('domains','Domain',true));?></th>			
			<th><?php echo $this->Paginator->sort('descriptions',__d('domains','Noute'));?></th>
			<th class="actions"><?php echo $this->Html->link(__d('domains','+ Add'), array('action' => 'add')); ?></th>
	</tr>
	<?php
	foreach ($domains as $domain): ?>
	<tr <?php echo ($domain['Domain']['project_domain']) ? 'class="project_domain"': '';?> onclick="document.location='<?php echo $this->Html->url(array('action' => 'select', $domain['Domain']['id']),true);?>'">
		<td><?php echo h($domain['Domain']['id']); ?>&nbsp;</td>
		<td><?php echo $this->Html->link($domain['Domain']['name'],'http://'.$domain['Domain']['name']); ?></td>		
		<td><?php echo h($domain['Domain']['descriptions']); ?>&nbsp;</td>
		<td class="actions">
 			<?php 
 				//echo (isset($this->passedArgs['add']) && $this->passedArgs['add'] == 'articles') ? $this->Html->link(__d('domains','Add article'), array('controller'=>'articles','action' => 'add','d'=>$domain['Domain']['id']),array('style'=>'margin-right: 10px;')) : '';
 				//echo $this->Html->link(__d('domains','View'), array('action' => 'view', $domain['Domain']['id']),array('class'=>'action-left'));
 				echo $this->Html->link(__d('domains','Edit'), array('action' => 'edit', $domain['Domain']['id']),array('class'=>'action-left'));
 				echo $this->Form->postLink(__d('domains','Delete'), array('action' => 'delete', $domain['Domain']['id']), array('style'=>'margin-right: 5px;','class'=>'action-right'), __d('domains','Are you sure you want to delete # %s?', $domain['Domain']['id'])); 
 			?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	$this->Paginator->options(array('url' => $this->passedArgs));
	echo $this->Paginator->counter(array(
	'format' => __d('domains','Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
	));
	?>	</p>

	<div class="paging">
	<?php
		echo $this->Paginator->prev('< ' . __d('domains','previous'), array(), null, array('class' => 'prev disabled'));
		echo $this->Paginator->numbers(array('separator' => ''));
		echo $this->Paginator->next(__d('domains','next') . ' >', array(), null, array('class' => 'next disabled'));
	?>
	</div>
</div>
<?php echo $this->element('/menu/left')?>
